Help:Semantic MediaWiki
The Semantic MediaWiki extension is enabled on the O2Jam wiki. This allows both humans and the software to interpret data on wiki pages. * For more detailed help see smw: and smw:Help:User manual. * See also the cheatsheet at smw:Image:SMW quick reference.png (smw:Media:SMW quick reference.png). The Semantic Forms extension is also enabled here. Properties This is a very basic style of assigning data into pages. To assign a property to a page, add the "link" syntax PropertyName::Value to the page. Multiple values can also be of the same property (name). For example, the song V3 (O2 Version) (go there to see it!) has the value "BeautifulDay" assigned to the property "Artist". This shows up in the database, see BeautifulDay for the results. For an example of multiple values assigned to the same property, see the V3 article again. This time, both Ley and Binny are assigned to the property Visual. Again, this shows up in the database, see the articles for Ley and Binny for the results. Property pages and types A property can have its respective property page in the "Property:" namespace. For example, the property page for Notecharter is Property:Notecharter. It contains information about the property, most importantly its type. The type specifies how the 'property links' should be interpreted and displayed. Some built-in types are Number, String, Date and Page. For example, you have two properties of types number and string. In queried tables, it would be most useful if you can sort nuymbers by their values and text alphabetically. String is displayed as just text, while Page is displayed as a link, useful if you have a page or plan to have one with the values assigned. Types can also have their own pages in the Type namespace. Inline queries You can place inline queries in a page using the #ask: (more common) and the #show: parser functions. Query The first text to put in ask is your query, ie, what would you like it to return. The query may include combinations of: * Category filters using Category links. Example: Category:Article stubs This gets only those pages under that certain category (and subcategories of it). * Property filters using property links, with a value. Example: BPM::160 * Link to a specific page. Example: Recollection Examples: * You may use the wildcard "+". * Consecutive query "links" has the default "logical AND" selection. Between query links, you may place any whitespace you want. For example, Category:EmployeesSalary::>5000Age::<40 will get pages for employees [and] whose salary is greater than or equal to 5000 and whose age is less than or equal to 40. * In property links, you can use the < and > signs to specify a range for your query. These are always inclusive of the range. * Inside a query link, you may use a pipe ("|") to specify a "logical OR". * Outside a query link, you may use the word "OR" to specify a "logical OR". show The show parser function is similar to ask except that it is useful for outputting a single property from a page. Example: Additional output Additional outputs ("printouts") are placed in "parameters" in pipes, preceded by a question mark ("?"). The previous example in show is an example of printouts. Examples: The label for the property can be changed by assigning it using an equal sign "=". The special property (no name) is for display of the query result and its label can also be assigned to. Examples: